<template>
  <j-modal title="模板信息" :width="800" :visible="visible" switchFullscreen @cancel="handleCancel" @ok="handleOk">
    <div>
      <p>模板分类：{{ infoObj.interviewClassification }}</p>
      <p>访谈主题：{{ infoObj.interviewTheme }}</p>
    </div>
    <a-tabs default-active-key="1" @change="onTabChange">
      <a-tab-pane key="1" tab="访谈大纲">
        <p class="p1">一、基础面</p>
        <p v-for="item in infoObj.base" :key="item.problem">{{ item.problem }}</p>
        <p class="p1">二、分析面</p>
        <p v-for="item in infoObj.analyze" :key="item.problem">{{ item.problem }}</p>
        <p class="p1">三、拓展面</p>
        <p v-for="item in infoObj.expand" :key="item.problem">{{ item.problem }}</p>
      </a-tab-pane>
    </a-tabs>
    <p class="p1">访谈材料</p>
    <j-upload v-model="infoObj.applyFile" :number="1"></j-upload>
    <template slot="footer">
      <p style="text-align: left;">创建人：{{ infoObj.createName }} <span style="margin-left:30px;">创建时间：{{
          infoObj.createTime
      }}</span> </p>
    </template>
  </j-modal>
</template>
<script>
import * as interviewApi from '@/api/sjsk/help/interview.js'
export default {
  name: 'detailModal',
  data() {
    return {
      visible: false,
      infoObj: {},
    }
  },
  async created() {
  },
  methods: {
    show(id) {
      this.visible = true
      this.infoObj = {}
      this.getDetail(id)
    },
    getDetail(id) {
      interviewApi.InterviewTemplateDetail(id).then(res => {
        if (res.success) {
          if (res.result != null) {
            this.infoObj = res.result
          }
        }
      })
    },
    onTabChange() {

    },
    handleCancel() {
      this.visible = false
    },
    handleOk() {
      this.visible = false
    }
  },
}
</script>
<style lang="less" scoped>
/deep/ .ant-modal-footer {
  display: flex;
  justify-content: space-between;
}

/deep/.ant-upload {
  display: none;
}

.p1 {
  font-weight: bold;
}
</style>
